<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html">

    <h:head>
        <title>
            <ui:insert name="title">HelpDeskRu</ui:insert>
        </title>
        <f:event type="preRenderView" listener="#{loginController.login}"/>
        
    </h:head>
        
    <h:body style="font-size: x-small">
        
        <p:growl autoUpdate="true"/>
        
        <p:ajaxStatus style="width:32px;height:32px; display:block; position:fixed; right:10px;top:22px;" 
                      id="ajaxStatusPanel">  
            <f:facet name="start">  
                <h:graphicImage  library="" name="asynch-1F.gif" style="border:0px"/>  
            </f:facet>  

            <f:facet name="complete">  
                <h:outputText value=""/>  
            </f:facet>  
        </p:ajaxStatus> 
        
        
        <!-- header -->
        <h:form id="header">
            <p:panel style="height: 70px;" styleClass="ui-widget ui-widget-header">
                <div style="text-align: left; padding: 15px 70px; float: left; width: 100px">
                    <h:link outcome="/index" value="HelpDeskRu"/>
                </div>
                <div style="text-align: right; padding: 15px;">
                    <h:link outcome="/user/index" value="[#{loginController.logged}]" rendered="#{loginController.isLogged}"/>
                    #{' '}
                    <h:commandLink action="#{loginController.logout}" value="#{prop['template.logout']}" rendered="#{loginController.isLogged}"/>
                    <h:link outcome="/login" value="#{prop['template.login']}" rendered="#{not loginController.isLogged}"/>
                    
                </div>
            </p:panel>
        </h:form>
        
        <br/>
        
        <!-- top menu -->
        <ui:insert name="top_menu">
            <ui:include src="/main_menu.xhtml"/> <!-- default menu -->
        </ui:insert>

        <br/>

        <!-- content -->
        <ui:insert name="content"/>

 
        <!-- dialog -->
        <ui:insert name="dialog_request"/>
            
    </h:body>

</html>